class OBPluginAgent:
    def backup_prerequisite_job(self, req_id, job_id, sub_id, json):
        """备份前置检查"""
        try:
            # 检查OceanBase集群状态
            self._check_cluster_health()
            
            # 检查存储路径可用性
            storage.check_write_permission()
            
            return ActionResponse.success()
        except Exception as e:
            log.error(f"Pre-check failed: {str(e)}")
            return ActionResponse.error(OceanBaseCode.PRECONDITION_FAILED)
            
    def _check_cluster_health(self):
        """集群健康检查"""
        cmd = "SELECT * FROM oceanbase.__all_server"
        result = self.conn.execute(cmd)
        if not result:
            raise Exception("Cluster health check failed")